package com.chenyaowei.web.controller.order.statistics;

import com.chenyaowei.common.core.controller.BaseController;
import com.chenyaowei.common.core.domain.AjaxResult;
import com.chenyaowei.order.request.StatisticsRequest;
import com.chenyaowei.order.service.ICywStatisticsService;
import com.chenyaowei.order.vo.StatisticsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/statistics")
public class CywStatisticsController extends BaseController {

    @Autowired
    private ICywStatisticsService cywStatisticsService;

    @GetMapping
    public AjaxResult statistics(StatisticsRequest statisticsRequest){
        StatisticsVO statisticsVO = cywStatisticsService.statistics(statisticsRequest);
        return success(statisticsVO);
    }

}
